/* 页面整体样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 210mm; /* A4宽度 */
    height: 297mm; /* A4高度 */
    background-color: white;
    padding: 15mm;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.header {
    text-align: center;
    margin-bottom: 15px;
}

.header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 5px;
}

.header p {
    font-size: 16px;
    color: #555;
}

/* 迷宫容器样式 */
.maze-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0;
}

.maze {
    width: 180mm;
    height: 220mm;
    border: 3px solid #000; /* 更粗的边框 */
    margin-bottom: 15px;
    position: relative;
}

.cell {
    position: absolute;
    background-color: white;
    border: 1px solid #ddd;
}

.cell.wall {
    background-color: #000; /* 纯黑色墙壁 */
    border-color: #000;
}

.cell.path {
    background-color: white;
}

.cell.start {
    background-color: #00a000; /* 更鲜明的绿色 */
    border: 2px solid #008000;
}

.cell.end {
    background-color: #e00000; /* 更鲜明的红色 */
    border: 2px solid #c00000;
}

.cell.solution {
    background-color: #0066ff;
}

/* 迷宫信息样式 */
.maze-info {
    display: flex;
    justify-content: space-between;
    width: 180mm;
}

.legend {
    display: flex;
    align-items: center;
}

.start-point, .end-point {
    padding: 5px 10px;
    margin-right: 15px;
    border-radius: 3px;
    color: white;
    font-weight: bold;
}

.start-point {
    background-color: #00a000;
}

.end-point {
    background-color: #e00000;
}

button {
    padding: 8px 15px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin: 0 5px;
}

button:hover {
    background-color: #0b7dda;
}

.footer {
    text-align: center;
    margin-top: 15px;
    color: #777;
}

/* 打印样式 */
@media print {
    body {
        background-color: white;
    }
    
    .container {
        box-shadow: none;
        padding: 0;
    }
    
    button {
        display: none;
    }
    
    .cell.wall {
        background-color: #000 !important;
        border-color: #000 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    .cell.path {
        background-color: white !important;
    }
    
    .solution-path {
        background-color: white !important;
    }
} 